xen: arm: map memory as inner shareable.
authorIan Campbell <ian.campbell@citrix.com>
Mon, 17 Mar 2014 14:53:23 +0000 (14:53 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 18 Mar 2014 15:55:14 +0000 (15:55 +0000)
commitec86971a9dd5d677184bde971e227475e2065203
tree2456cdb3aabe4dc7a2dbf46451e005b34770fed8
parentfe1a6bc7546d006384157b6b004efdd3b9d283c5
xen: arm: map memory as inner shareable.

The inner shareable domain contains all SMP processors, including different
clusters (e.g. big.LITTLE). Therefore this is the correct thing to use for Xen
memory mappings. The outer shareable domain is for devices on busses which are
coherent and barrier-aware (e.g. AMBA4 AXI with ACE). While the system domain
is for things behind bridges which are not.

One wrinkle is that Normal memory with attributes Inner Non-cacheable, Outer
Non-cacheable (which we call BUFFERABLE) must be mapped Outer Shareable on ARM
v7. Therefore change the prototype of mfn_to_xen_entry to take the attribute
index so we can DTRT. On ARMv8 the sharability is ignored and considered to
always be Outer Shareable.

Don't adjust the barriers, flushes etc, those remain as they were (which is
more than is now required).  I'll change those in a later patch.

Many thanks to Leif for explaining the difference between Inner- and
Outer-Shareable in words of two or less syllables, I hope I've replicated that
explanation properly above!

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/arm32/head.S
xen/arch/arm/arm64/head.S
xen/arch/arm/mm.c
xen/arch/arm/p2m.c
xen/include/asm-arm/page.h